package com.service;

import com.entity.Course;
import com.entity.Student;
import com.entity.Grade;
import com.mapper.CourseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CourseService {

    @Autowired
    private CourseMapper courseMapper;

    public List<Course> find(){
        return courseMapper.find();
    }

    public int addGrade(Course grade){
        return courseMapper.addGrade(grade);
    }
    public int deleteGrade(String sno,String cno){ return courseMapper.deleteGrade(sno,cno); }

    public Grade getUpdateGrade(String sno,String cno){return courseMapper.getUpdateGrade(sno,cno);}

    public int editGrade(String sno,String cno,String grade){return courseMapper.editGrade(sno,cno,grade);}

    public List<Course> allGrade(){return courseMapper.allGrade();}
}